package edu.gatech.cs2340.JUnit;

import static org.junit.Assert.*;

import org.junit.Test;
import edu.gatech.cs2340.OregonTrail.*;

public class TestParty {

	@Test
	public void testParty() {
		PartyMember p1 = new PartyMember("Joe");
		PartyMember p2 = new PartyMember("Frank");
		PartyMember p3 = new PartyMember("Sally");
		PartyMember p4 = new PartyMember("Sue");
		Player player = new Banker("George");
		Party testParty = new Party(player, p1, p2, p3, p4);
		
		assertEquals(4, testParty.getParty().size());
		assertEquals("Joe", testParty.getParty().get(0).getName());
		assertEquals("Frank", testParty.getParty().get(1).getName());
		assertEquals("Sally", testParty.getParty().get(2).getName());
		assertEquals("Sue", testParty.getParty().get(3).getName());
		assertEquals("George", testParty.getPlayer().getName());
		
	}

	/**
	  * @Author Thomas Mahoney 
	  *
	  * This tests to make sure an illness event works.
	  */
	@Test
	public void testIllnessEvent(){
		PartyMember p1 = new PartyMember("Joe");
		PartyMember p2 = new PartyMember("Frank");
		PartyMember p3 = new PartyMember("Sally");
		PartyMember p4 = new PartyMember("Sue");
		Player player = new Banker("George");
		Party testParty = new Party(player, p1, p2, p3, p4);
		
		IllnessEvent event = new IllnessEvent(this, eStatus.sick, "REPLACEME got sick.");
		testParty.actorActionPerformed(event);		
	}
}
